<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@include file="/resource/common/taglib.jspf"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>添加</title>
<%@include file="/resource/common/jquery.jspf"%>
<%@include file="/resource/common/commonCss.jspf"%>
<%@include file="/resource/common/bootstrap.jspf"%>
<%@include file="/resource/common/validate.jspf"%>
<%@include file="/resource/common/kindeditor.jspf"%>
<link rel="stylesheet" href="${ctxStatic}/plugins/upload/image.css" type="text/css" media="screen" />
<script type="text/javascript" src="${ctxStatic }/js/system/asyncDoSubmitForm.js"></script>
<script type="text/javascript" src="${ctxStatic }/plugins/upload/uploadImageUtils.js"></script>

</head>
<body>
	<div id="body-wrapper">
		<div id="main-content">
			<div class="content-box" >
				<div class="content-box-content">
					<div class="tab-content default-tab" id="tab1">
						<fieldset>
							<input type="hidden" id="asyncResult" name="asyncResult" value="-1" /> 
							<input type="hidden" id="asyncResultData" name="asyncResultData" value="-1" /> 
							<input type="hidden" id="asyncResultError" name="asyncResultError" value="-1" />
							<form:form id="inputForm" name="form1" class="form-horizontal" method="post" action="addWebVideo.do" modelAttribute="WebVideo">
								<div class="row">
									<div class="col-md-6 col-sm-6 col-xs-6" >
										<input type="hidden" id="id" name="id" value="${entity.id}" /> 
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">视频类别:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<select name="type" id="type" class="form-control input-sm">
													<c:forEach var="item" items="${cate_list }" varStatus="s">
														<option value="${item.id}" <c:if test="${item.id == entity.type }"> selected="selected"</c:if>> ${item.title } </option>
													</c:forEach>
												</select>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">展会名称:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.title}" name="title" id="title"  placeholder="展会名称"/>
											</div>
										</div>
										
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">活动时间:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.activityTime}" name="activityTime" id="activityTime"  placeholder="活动时间"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">活动地址:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.activityAddress}" name="activityAddress" id="activityAddress"  placeholder="活动地址"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">主讲人:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.activitySpeaker}" name="activitySpeaker" id="activitySpeaker"  placeholder="主讲人"/>
											</div>
										</div>
										
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">图片：</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="hidden" id="photo" name="photo" value="${entity.photo }"/>
												<input type="hidden" id="filedata" name="filedata" />
												<input type="hidden" id="fileext" name="fileext" />
												<div id="uploadPreview" class="uploadPreview">
													5M大小以内
												</div>
											</div>
										</div>
										<div class="form-group form-group-sm">
											<label for="formGroupInputSmall" class="col-md-2 col-sm-2 col-xs-2 control-label"></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input id="uploadImage" type="file" name="photoimage" class="fimg1" />
											</div>
										</div>
										<div  style="color: red;text-align: center;margin-bottom: 10px;margin-left: -150px;" id="msg"></div>
									</div>
									<div class="col-md-6 col-sm-6 col-xs-6" >

										 <!--
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">国家:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.country}" name="country" id="country"  placeholder="国家"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">所属城市:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.city}" name="city" id="city"  placeholder="所属城市"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">房屋地址:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.houseAddress}" name="houseAddress" id="houseAddress"  placeholder="房屋地址"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">价格(人民币):</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.housePriceCny}" name="housePriceCny" id="housePriceCny"  placeholder="房产价格(人民币)"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">价格(美元):</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.housePriceDols}" name="housePriceDols" id="housePriceDols"  placeholder="房产价格(美元)"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">项目类型:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.projectType}" name="projectType" id="projectType"  placeholder="项目类型"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">主力户型:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.houseType}" name="houseType" id="houseType"  placeholder="主力户型"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">房屋面积:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.houseSize}" name="houseSize" id="houseSize"  placeholder="房屋面积"/>
											</div>
										</div>
										-->
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">房源ID:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.houseId}" name="houseId" id="houseId"  placeholder="房源ID"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">投资类型:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.investmentType}" name="investmentType" id="investmentType"  placeholder="投资类型"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">排序:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.sort}" name="sort" id="sort"  placeholder="排序"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">是否开启:<span style="color: red">*</span></label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<select name="status" id="status" class="form-control input-sm">
													<option value="true" <c:if test="${entity.status==true }">selected="selected"</c:if>>开启</option>
													<option value="false" <c:if test="${entity.status==false }">selected="selected"</c:if>>关闭</option>
												</select>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-2 col-sm-2 col-xs-2 control-label">浏览次数:</label>
											<div class="col-md-10 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.pageView}" name="pageView" id="pageView"  placeholder="浏览次数"/>
											</div>
										</div>
									</div>
								</div>
								<div class="row">
									<div class="col-md-12 col-sm-12 col-xs-12" >
									<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">seoTitle:</label>
											<div class="col-md-11 col-sm-10 col-xs-10">
												<input type="text" class="form-control input-sm" value="${entity.seoTitle}" name="seoTitle" id="seoTitle"  placeholder="seoTitle"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">seoKeyword:</label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<input type="text" class="form-control input-sm" value="${entity.seoKeyword}" name="seoKeyword" id="seoKeyword"  placeholder="seoKeyword"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">seoDescription:</label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<input type="text" class="form-control input-sm" value="${entity.seoDescription}" name="seoDescription" id="seoDescription"  placeholder="seoDescription"/>
											</div>
										</div>

										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">摘要:</label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<input type="text" class="form-control input-sm" value="${entity.description}" name="description" id="description"  placeholder="description"/>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">视频地址:</label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<textarea name="video" id="video" class="form-control input-sm" rows="3" cols="90">${entity.video}</textarea>
											</div>
										</div>
										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">音频地址:</label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<textarea name="audio" id="audio" class="form-control input-sm" rows="3" cols="90">${entity.audio}</textarea>
											</div>
										</div>

										<div class="form-group">
											<label class="col-md-1 col-sm-1 col-xs-1 control-label">内容:</label>
											<div class="col-md-11 col-sm-11 col-xs-11">
												<textarea id="content" name="content" style="width: 100%; height: 200px; visibility: hidden;">${entity.content }</textarea> 您当前输入了 <span class="word_count">0</span> 个文字。（字数统计包含纯文本、IMG、EMBED，不包含换行符，IMG和EMBED算一个文字。）
											</div>
										</div>

									</div>
								</div>

							</form:form>
						</fieldset>
					</div>
				</div>
				<!-- End .content-box-content -->
			</div>
		</div>
		<!-- End #main-content -->
	</div>
<script type="text/javascript">
var result = 0;
var validateForm;
$(document).ready(function() {
	validateForm = $("#inputForm").validate({
		rules : {
			type : {
				required : true
			},
			title : {
				required : true
			},
			sort : {
				required : true,
                digits:true
			},
			status : {
				required : true
			}
		},
		messages : {
			type : {
				required : "视频类别不能为空"
			},
			title : {
				required : "展会名称不能为空"
			},
			sort : {
				required : "排序不能为空",
                digits:"只能输入整数"
			},
			status : {
				required : "是否开启不能为空"
			}
		},
		errorElement : "em",
		errorClass : "validate_error",
		submitHandler: function(form) { //通过之后回调
		},
		invalidHandler: function(form, validator) {
			return false;
		}
	});
	

	//初始在线编辑器
    ShowEditorHtml("#content", "word_count");

	$("#uploadImage").imageUploadUtils({
		data : "#filedata",
		ext : "#fileext",
		msg : "#msg",
		preview : "#uploadPreview",
	});
	
	var photo = "${entity.photo}";
	var bg = "resource/images/header.png";
	if(photo!=''){
		bg = photo;
	}
	$("#uploadPreview").css("background-image", "url("+bg+")");
});

</script>	
</body>
<!-- Download From www.exet.tk-->
</html>